<%@ include file="/common/taglibs.jsp" %>

<head>
    <title><fmt:message key="login.title"/></title>
    <meta name="heading" content="<fmt:message key='login.heading'/>"/>
    <meta name="menu" content="Login"/>
    <%--<link rel="stylesheet" type="text/css" media="all" href="<c:url value='/styles/${appConfig["csstheme"]}/layout-1col.css'/>" />--%>
    <link rel="stylesheet" type="text/css"
          href="${appConfig["yuipath"]}/build/reset-fonts-grids/reset-fonts-grids.css"/>

    <script type="text/javascript">
        function login() {
            //The second argument passed to the
            //constructor is a configuration object:
            var myPanel = new YAHOO.widget.Panel("loginDialog", { width:"400px",
                fixedcenter: true,
                constraintoviewport: true,
                underlay:"matte",
                close:false,
                visible:false,
                modal:true});
            myPanel.render();

        }
        YAHOO.util.Event.onDOMReady(login);
    </script>
</head>
<body onload="login()" id="login" class="yui-skin-sam"/>


<div id="doc2" class="yui-t2">

    <div id="center">
        <div id="yui-main">
            <div class="yui-b">
                <h1>Content</h1>

                <div id="content">


                </div>
            </div>
            <!--<div class="yui-b">-->
            <!--Navigation-->
            <!--</div>-->
        </div>
    </div>
</div>


<div id="loginDialog" style="display:none;">
    <div class="hd">Login</div>
    <div class="bd">
        <form method="post" id="loginForm" action="<c:url value='/j_security_check'/>"
              onsubmit="saveUsername(this);return validateForm(this)">
            <div class="smallTitle">Welcome to the Bandmate Management System.</div>
            <br/>

            <div>
                <table cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <td style="width: 80px"><label for="j_username"><fmt:message key="label.username"/></label></td>
                        <td><input type="text" name="j_username" id="j_username" class="textBox"/></td>
                    </tr>
                    <tr>
                        <td><label for="j_password"><fmt:message key="label.password"/></label></td>
                        <td><input type="password" name="j_password" id="j_password" class="textBox"/></td>
                    </tr>
                    <tr>

                        <td colspan="2">
                            <c:if test="${param.error != null}">
                                <div id="loginError">
                                    <li class="error">
                                        <img src="${ctx}/images/iconWarning.gif" alt="<fmt:message key='icon.warning'/>"
                                             class="icon"/>
                                        <fmt:message key="errors.password.mismatch"/>
                                            <%--${sessionScope.ACEGI_SECURITY_LAST_EXCEPTION.message}--%>
                                    </li>
                                </div>
                            </c:if>
                        </td>
                    </tr>
                </table>
                <c:if test="${appConfig['rememberMeEnabled']}">
                    <li>
                        <input type="checkbox" class="checkbox" name="rememberMe" id="rememberMe" tabindex="3"/>
                        <label for="rememberMe" class="choice"><fmt:message key="login.rememberMe"/></label>
                    </li>

                </c:if>
                <li>
                    <input type="submit" class="yuibutton" name="login" value="<fmt:message key='button.login'/>"
                           tabindex="4"/>

                    <p>
                        <fmt:message key="login.signup">
                            <fmt:param><c:url value="/signup.html"/></fmt:param>
                        </fmt:message>
                    </p>
                </li>
                <%@ include file="/scripts/login.js" %>

                <p><fmt:message key="login.passwordHint"/></p>

            </div>
        </form>
    </div>
</div>
